package cpr.data;

import java.util.Comparator;

import cpr.Utils;

public class AREntryComparator implements Comparator {
    public int compare(Object o1, Object o2) {
        AREntry a1 = (AREntry)o1;
        AREntry a2 = (AREntry)o2;
        HLVector v1 = a1.vector;
        HLVector v2 = a2.vector;
        if (v1.score!=v2.score) return v1.score-v2.score;
        return Utils.compare(a1.rule, a2.rule, a1.vector);
//        return b? 0:-1;
//        int s1 = Utils.getScore(v1);
//        int s2 = Utils.getScore(v2);
//        if (s1==s2) {
//            int str1 = Utils.printRuleAccordingToVectorDigital(a1.rule, a1.vector);
//            int str2 = Utils.printRuleAccordingToVectorDigital(a2.rule, a2.vector);
//            return str1-str2;
//        }
//        return s1-s2;
    }
}